<div id="chat_history" wire:poll.5000ms>
    <x-bladewind.list-view compact="true" id="command-list" transparent="true">
        @foreach($this->commands as $command)
            <div x-intersect.half="$wire.loadMore()">
            <x-bladewind.list-item  class="bg-primary text-white rounded-lg" >
                <div class="ml-3">
                    <div class="text-sm font-medium text-slate-900 rounded-lg">
                        {{ $command['command'] }}
                    </div>
                    <div class="text-sm text-slate-500 truncate rounded-lg">
                        {{ date('Y-m-d H:i:s', $command['time']) }}
                    </div>
                </div>
            </x-bladewind.list-item>
            <x-bladewind.list-item class="{{ $command->response->success == 1 ? 'bg-green-500' : 'bg-red-500'}} text-white rounded-lg">
                <div class="ml-3">
                    <div class="text-sm font-medium text-slate-900">
                        {!!  nl2br(e($command->response->response)) !!}
                    </div>
                </div>
            </x-bladewind.list-item>
            </div>
        @endforeach
    </x-bladewind.list-view>
</div>
